# 努力学习
# 比肩漆时祺和周期许
# class GetListApi():
#     @classmethod
#     def get_list(self,session,rep_data):
#         resp=session.get(url=f'http://127.0.0.1:8888/api/private/v1/users',
#                          data=rep_data)
#         return resp

"""添加用户"""
# class AddUserApi():
#     @classmethod
#     def add_user(cls,session,rep_data):
#         resp=session.post(url='http://127.0.0.1:8888/api/private/v1/users',
#                           headers={"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE3Mjc1OTk1NTgsImV4cCI6MTcyNzY4NTk1OH0.NMZYIBFMsZZzwrvw_pON5yEG2fPv3hIZO0uqFdwYYpY"},
#                           data=rep_data)
#         return resp

import requests
"""查询用户"""
class GetUserApi():
    # session=None

    @classmethod
    def get_user(cls,session,a,b,headers):
        # session = requests.Session()
        url=f'http://127.0.0.1:8888/api/private/v1/users?pagenum={a}&pagesize={b}'
        resp=session.get(url=url,
                          headers={"Authorization":f'{headers}'},
                          )
        return resp
# if __name__ == '__main__':
#     session = requests.Session()
#     print(GetUserApi.get_user(session, 1, 20))